<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="org.quickbundle.orgauth.util.impl.RmOrgService"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@page import="org.quickbundle.project.common.vo.RmCommonVo"%>
<%@page import="org.quickbundle.project.RmProjectHelper"%>
<%@ page import="java.util.List" %>
<%@page import="org.quickbundle.tools.helper.RmVoHelper"%>
<%@page import="org.quickbundle.tools.helper.RmJspHelper"%>
<%@page import="org.quickbundle.project.RmGlobalReference"%>
<%@page import="org.quickbundle.base.web.page.RmPageVo"%>
<%@ page import="org.quickbundle.orgauth.rmuser.vo.RmUserVo" %>
<%@ page import="org.quickbundle.orgauth.rmuser.util.IRmUserConstants" %>
<%@page import="org.quickbundle.base.beans.factory.RmBeanFactory"%>
<%@page import="org.quickbundle.orgauth.IOrgauthConstants"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<%@ taglib uri="/dfhc" prefix="dfhc" %>
<!-- 全局js 和css包 -->
<%@ include file="/jsp/include/web/new/global.jsp" %>
<title>用户管理</title>
</head>


<body>
<article class="page-container">
<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/huiBodyTemp" >
<form name="form" method="post">
	<dfhc:region name="searchRegion">
    </dfhc:region>	
    <dfhc:region name="tableRegion">
    <table width=98% align=center border=0 cellpadding=0 cellspacing=0 class="mainTable">
	  <tr>
		<td>
          <b><font class=p12>系统管理 	&gt;&gt; 用户管理	&gt;&gt; 分配角色 	&gt;&gt; 当前员工名称：</font><font color=red class=p14>${party_name}</font></b>&nbsp;&nbsp;
        </td>
	  </tr>
	</table>
	    	全局角色：
	    	<dfhc:table templateId="table_h_ui" >   
				<c:forEach items="${isSystemLevelList}" var="list" begin='0' step='1' varStatus="status"  > 
				<dfhc:tr   > 
				<dfhc:td >
					<dfhc:checkbox  name="role_name"  value="${list.id}"  />
				</dfhc:td>
				<dfhc:td >
				  ${list.name}(${list.role_code})
				</dfhc:td>
				</dfhc:tr  >
				</c:forEach> 
			</dfhc:table>  
		  --->
		  <br>
		公司角色：
			<dfhc:table templateId="table_h_ui" >   
				<c:forEach items="${notSystemLevelList}" var="list" begin='0' step='1' varStatus="status"  > 
				<dfhc:tr   > 
				<dfhc:td >
					<dfhc:checkbox  name="role_name"  value="${list.id}"  />
				</dfhc:td>
				<dfhc:td  >
				${list.name} (${list.role_code})				
				</dfhc:td>
				</dfhc:tr  >
				</c:forEach> 
			</dfhc:table> 
			<dfhc:region name="buttonRegion">
		        <dfhc:div templateId="h_ui_div_table_button">
		        <dfhc:span templateId="h_ui_button_span">
		        	<dfhc:input type="hidden" value="${ party_id}" name="id"/>
				 <dfhc:button templateId="h_ui_author_button" onclick="_singleAuth('${pageContext.request.contextPath }/newRmUser/insertPartyRole','${ party_id}')" />
				</dfhc:span>
				<dfhc:span templateId="h_ui_total_record_num_span">${RM_PAGE_VO.recordCount}</dfhc:span>		
	    		</dfhc:div>		       
     		</dfhc:region>
     </dfhc:region>
      <dfhc:region name="footer"> 
     </dfhc:region> 
</form>    
</dfhc:template>  
</article>  
</body>
<script type="text/javascript">
//授权

function _singleAuth(url,id){
	var newUrl=url+'?id='+id;
		$.ajax({
			type: 'POST',
			url: newUrl,
			dataType: 'json',
			success: function(data){
				//$(obj).parents("tr").remove();
				layer.msg('设置成功!',{icon:1,time:1000});
				$('.table-sort').DataTable().ajax.reload();
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
}

<% 
HashMap map=(HashMap<String,Object>)request.getAttribute("sWriteBack");
out.print(RmVoHelper.writeBackMapToForm(map));
%>
</script>
</html>